type callfunType = (item: Cardmin) => void;
enum BIndType {
    TG = 'Telegram',
    TWITTER = 'Twitter'
}
enum BIndText {
    COOM = 'climed',
    TGB = 'Join',
    TWITTERB = 'Follow'
}

class Cardmin {
    label: string;
    subtitle: string | undefined;
    active: boolean;
    reward: number;
    isTap:boolean;
    BIndText={
        COOM : 'climed',
        TGB : 'Join',
        TWITTERB : 'Follow'
    }
    callfn: callfunType = (item: Cardmin) => { };
    constructor(label: BIndType, active: boolean, reward: number,isTap: boolean, callfun: callfunType = () => { }) {
        this.label = label;
        this.active = active;
        this.reward = reward;
        this.isTap = isTap;
        this.computesub();
        this.callfn = callfun;
    }
    computesub() {
        if (this.active) {
            switch (this.label) {
                case BIndType.TWITTER:
                    this.subtitle = this.BIndText.COOM;
                    break;
                case BIndType.TG:
                    this.subtitle = this.BIndText.COOM;
                    break;
            }
        } else {
            switch (this.label) {
                case BIndType.TWITTER:
                    this.subtitle = this.BIndText.TWITTERB;
                    break;
                case BIndType.TG:
                    this.subtitle = this.BIndText.TGB;
                    break;
            }
        }
    }
};
export { Cardmin, BIndType, BIndText };